package spring.bean;

import java.io.File;
import java.io.FileOutputStream;

import javax.imageio.stream.FileCacheImageOutputStream;

public class ResourceBean {
	private FileOutputStream fos;
	private File file;

	public void init() {

		try {
			this.fos = new FileOutputStream(file);
		} catch (Exception e) {
			e.printStackTrace();
		}
	}

	public void destroy() {

		try {
			fos.close();
		} catch (Exception e) {
			e.printStackTrace();
		}
	}

	public File getFile() {
		return file;
	}

	public void setFile(File file) {
		this.file = file;
	}

	public FileOutputStream getFos() {
		return fos;
	}

	public void setFos(FileOutputStream fos) {
		this.fos = fos;
	}
}
